package com.zengqingfa.basic.mapstruct;


import com.zengqingfa.basic.dto.Car;
import com.zengqingfa.basic.dto.CarDto;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

@Mapper(componentModel = "spring")
public interface CarConverter2 {


    /**
     * 属性名一样的，会自动映射并填充，属性名不一样的用下面这个 @Mapping 注解，定义映射关系
     * source 为数据来源，target为要填充的目标属性
     */
    @Mapping(source = "wheel", target = "whe")
    CarDto carToDto(Car car);
}

